import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:何人亮
 * Date:2024-06-01
 * 20:32
 */
public class Teat {
    public static void main(String[] args) {

        String s3 = new String("ABc");
        String s4 = new String("abcdef");
        StringBuilder stringBuilder=new StringBuilder();
        for (int i = 0; i < s4.length(); i++) {
            char ch=s4.charAt(i);
            stringBuilder.append(ch);
        }

        System.out.println(stringBuilder.toString());//abcedf
        System.out.println(stringBuilder.reverse().toString());//fedcba
    }
}
